package com.ouc.yyi.springcloud.gateway.yml;

import org.springframework.cloud.gateway.filter.GatewayFilter;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.core.Ordered;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

/**
 * @description:
 * @author: yyi
 * @date: 2022/9/26 14:57
 * @version: 1.0
 **/

public class UserGatewayFilter implements GatewayFilter, Ordered {
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        System.err.println("我是通过配置文件访问的gatewayFilter");
        return chain.filter(exchange);
    }

    @Override
    public int getOrder() {
        return -100;
    }
}
